package com.loveprigrammer.eternity.task.core;


import com.loveprigrammer.eternity.task.work.WorkResult;

/**
 *
 * @version 1.0.0
 * @description: 回调接口、奖励
 * @author: eric
 * @date: 2022-07-14 17:43
 **/
@FunctionalInterface
public interface ICallback<T,V> {

    /**
     * 任务开始的监听
     */
    default void begin() {

    }

    /**
     * 耗时操作执行完毕后，就给value注入值
     */
    void result(boolean success,T param, WorkResult<V> workResult);
}
